#!/usr/bin/env python

def climb_stairs_v1(n):
    '''
    问题：人们爬楼梯可以爬1步或2步， 问：爬到n楼，有多少中爬楼梯的方法
    '''
    dp = [0] * (n + 1)
    dp[1] = 1
    dp[2] = 2

    for i in range(3, n + 1):
        dp[i] = dp[i - 1] + dp[i - 2]

    return dp[n]



if __name__ == "__main__":
    print(climb_stairs_v1(10))